<template>
	<view class="wenti">
		<view class="top1">
			<view class="top_s">
				您有什么问题吗？
				<view class="top_s2">
					已为那你定制以下内容
				</view>
			</view>	
		</view>
		
		<view class="nav" v-for="(item,index) in list" @click="xz=index">
			<view class="top">
				{{item.title}}
				<image   v-if="xz==index" style="height: 40rpx;width: 40rpx;position: relative;float: right;right: 30rpx;" src="/static/my/1697484061112.png"></image>
				<image  v-else style="height: 40rpx;width: 40rpx;position: relative;float: right;right: 30rpx;" src="/static/my/1697484197440.png"></image>
			</view>	
			<view v-if="xz==index">
				<view class="cnt" v-for="(items) in item.list" >
					<view class="lef">
					</view>	
					<view class="right">
						{{items.title}}
					</view>	
				</view>	
				
			</view>	
		</view>
		
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userinfo:null,
				xz:0,
				list:[],
			};
		},
		onLoad() {
			this.get_userinfo();
		},
		onShow() {
			
		},
		methods: {
			share_dea(){
				uni.navigateTo({ url: "/pages/share/share_list"});
			},
			get_userinfo(){
				let that = this;
				uni.showLoading({ title: '正在加载', mask: true });
				uni.hideLoading();
				that.$api.request('/api/user/get_wente', {},uni.getStorageSync('token'), function(res) {
							uni.hideLoading()
							if (res.code === 1) {
								that.list = res.data
							} 
				});
				
			},
			// 导航点击处理
			navClickHandle(item) {
				if (item.url) {
					uni.navigateTo({ url: item.url });
				}
			},

			// 跳转设置
			jumpSetting() {
				uni.navigateTo({
					url: '/pages/settings/settings'
				});
			},

			// 跳转分享页面
			jumpShare() {
				uni.navigateTo({
					url: '/pages/share/share'
				});
			}
		}
	};
</script>

<style lang="less">
	page {
		background: #fff;
	}
	.wenti{
		.top1{
			width:100%;
			font-size: 55rpx;
			font-weight: 700;
			padding-bottom: 20px;
			border-bottom: 1rpx solid #cecece;
			.top_s{
				margin-top: 35rpx;
				margin-left: 30rpx;
				.top_s2{
					margin-top: 20rpx;
					font-size:26rpx;
				}
			}
		}
		.nav{
			width: 100%;
			font-size:30rpx;
			float: left;
			padding-bottom: 40rpx;
			border-bottom: 1rpx solid #cecece;
			.top{
				margin-top: 28rpx;
				font-weight: 700;
				margin-left: 30rpx;
			}
			.cnt{
				width: 100%;
				float:left;
				margin-top: 20rpx;
				.lef{
					margin-left: 30rpx;
					margin-top:12rpx;
					float: left;
					width: 20rpx;
					height: 20rpx;
					background:#e3dab6 ;
					border-radius: 50em;
				}
				.right{
					float: left;
					margin-left: 15rpx;
				}
			}
		}
	}
	
</style>
